package cn.rongdao.jrkabao;

import com.mifengkong.frtools.app.FRServletAddress;
import com.mifengkong.frtools.http.request.cloudapi.FRCloudAPIUtil;

import cn.rongdao.jrkabao.constant.ServletAddressConstant;

import static com.mifengkong.frtools.util.FRToast.getString;

/**
 * Created by jack on 2017/8/31
 */

public class HttpServletAddress {

    private HttpServletAddress() {

    }

    public static void init() {
        FRServletAddress.getInstance()
                .setOnlineServletAddress(ServletAddressConstant.SU_DAI, getString(R.string.sudai_online_address))
                .setReleaseServletAddress(ServletAddressConstant.SU_DAI, getString(R.string.sudai_release_address))
                .setOfflineServletAddress(ServletAddressConstant.SU_DAI, getString(R.string.sudai_offline_address))

                .setOnlineServletAddress(ServletAddressConstant.KA_MAO,  getString(R.string.kamao_online_address))
                .setReleaseServletAddress(ServletAddressConstant.KA_MAO, getString(R.string.kamao_release_address))
                .setOfflineServletAddress(ServletAddressConstant.KA_MAO, getString(R.string.kamao_offline_address));

        FRCloudAPIUtil.getInstance()
                .setBaseUrl(ServletAddressConstant.SU_DAI, getString(R.string.sudai_cloud_base_url))
                .setAppKey(ServletAddressConstant.SU_DAI, getString(R.string.sudai_cloud_app_key))
                .setSecretKey(ServletAddressConstant.SU_DAI, getString(R.string.sudai_cloud_secret_key))

                .setBaseUrl(ServletAddressConstant.KA_MAO, getString(R.string.cash_advance_cloud_base_url))
                .setAppKey(ServletAddressConstant.KA_MAO, getString(R.string.cash_advance_cloud_app_key))
                .setSecretKey(ServletAddressConstant.KA_MAO, getString(R.string.cash_advance_cloud_secret_key));
    }
}